<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改车辆')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-vehicle-edit" th:object="${tVehicle}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">车辆识别号代码：</label>
                    <div class="col-sm-8">
                        <input name="vinCode" th:field="*{vinCode}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">品牌：</label>
                    <div class="col-sm-8">
                        <select name="brand" class="form-control" th:with="type=${@dict.getType('vehicle_brand_name_dic')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{brand}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">整车型号：</label>
                    <div class="col-sm-8">
                        <input name="vehicleModel" th:field="*{vehicleModel}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">生产序号：</label>
                    <div class="col-sm-8">
                        <input name="productionSerialNumber" th:field="*{productionSerialNumber}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">乘员数：</label>
                    <div class="col-sm-8">
                        <input name="numberOfOccupants" th:field="*{numberOfOccupants}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">乘员数_特殊：</label>
                    <div class="col-sm-8">
                        <input name="numberOfOccupantsSpecial" th:field="*{numberOfOccupantsSpecial}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">最大允许总质量 kg：</label>
                    <div class="col-sm-8">
                        <input name="maximumAllowableGrossMass" th:field="*{maximumAllowableGrossMass}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">主驱动电机型号：</label>
                    <div class="col-sm-8">
                        <input name="mainDriveMotorModel" th:field="*{mainDriveMotorModel}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">2号电机型号：</label>
                    <div class="col-sm-8">
                        <input name="motor2Model" th:field="*{motor2Model}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">3号电机型号：</label>
                    <div class="col-sm-8">
                        <input name="motor3Model" th:field="*{motor3Model}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">4号电机型号：</label>
                    <div class="col-sm-8">
                        <input name="motor4Model" th:field="*{motor4Model}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">动力电池工作电压 V：</label>
                    <div class="col-sm-8">
                        <input name="powerBatteryOperatingVoltage" th:field="*{powerBatteryOperatingVoltage}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">主驱动电机额定功率 kW：</label>
                    <div class="col-sm-8">
                        <input name="mainDriveMotorRatedPower" th:field="*{mainDriveMotorRatedPower}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">2号电机额定功率：</label>
                    <div class="col-sm-8">
                        <input name="motor2RatedPower" th:field="*{motor2RatedPower}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">3号电机额定功率：</label>
                    <div class="col-sm-8">
                        <input name="motor3RatedPower" th:field="*{motor3RatedPower}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">4号电机额定功率：</label>
                    <div class="col-sm-8">
                        <input name="motor4RatedPower" th:field="*{motor4RatedPower}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">动力电池容量 AH：</label>
                    <div class="col-sm-8">
                        <input name="powerBatteryCapacity" th:field="*{powerBatteryCapacity}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">主驱动电机峰值功率 kW：</label>
                    <div class="col-sm-8">
                        <input name="mainDriveMotorPeakPower" th:field="*{mainDriveMotorPeakPower}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">2号电机峰值功率：</label>
                    <div class="col-sm-8">
                        <input name="motor2PeakPower" th:field="*{motor2PeakPower}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">3号电机峰值功率：</label>
                    <div class="col-sm-8">
                        <input name="motor3PeakPower" th:field="*{motor3PeakPower}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">4号电机峰值功率：</label>
                    <div class="col-sm-8">
                        <input name="motor4PeakPower" th:field="*{motor4PeakPower}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">制造年月：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <input name="manufacturingDate" th:value="${#dates.format(tVehicle.manufacturingDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">制造国：</label>
                    <div class="col-sm-8">
                        <select name="countryOfManufacture" class="form-control" th:with="type=${@dict.getType('country_dic')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{countryOfManufacture}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">备注信息：</label>
                    <div class="col-sm-8">
                        <textarea name="remarks" class="form-control">[[*{remarks}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">车牌号：</label>
                    <div class="col-sm-8">
                        <input name="licensePlateNumber" th:field="*{licensePlateNumber}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">责任人：</label>
                    <div class="col-sm-8">
                        <input name="responsiblePerson" th:field="*{responsiblePerson}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">责任人联系方式：</label>
                    <div class="col-sm-8">
                        <input name="responsiblePersonContact" th:field="*{responsiblePersonContact}" class="form-control" type="text">
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/vehicle";
        $("#form-vehicle-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-vehicle-edit').serialize());
            }
        }

        $("input[name='manufacturingDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>